package net.kangyee.eventmanager.commands;

import org.bukkit.entity.Player;

import net.kangyee.eventmanager.EventManager;
import net.kangyee.eventmanager.util.ConfigManager;
import net.kangyee.eventmanager.util.MessageManager;

public class CmdStop extends EventManagerCommand {
	
	private EventManager plugin;
	private ConfigManager config;
	
	public CmdStop(EventManager plugin, ConfigManager config){
		this.plugin = plugin;
		this.config = config;
	}
	
	public void onCommand(Player player, String[] args){
    	MessageManager.sendNormalMessageToAll(config.messageStop.replaceAll("%event%", plugin.getEventName()));
    	plugin.resetPlugin();
		return;
	}

	public String getCmdName(){
		return "stop";
	}

	public String getArgs(){
		return "";
	}
	
	public int getMaxArgs(){
		return 1;
	}

	public int getMinArgs(){
		return 1;
	}

	public String getPermission(){
		return "eventmanager.admin." + getCmdName();
	}

	public boolean getStateRequire(){
		return true;
	}
	
	public boolean getRegPCRequire() {
		return false;
	}
}
